Release 10.1A: OpenEdge Development:
Basic Database Tools


Index Editor option

Use the Schema Index Editor menu option to define, rename, or delete indexes for the selected table. An index is a field or combination of fields used to rapidly retrieve a particular record in a table. A single index can be made up of multiple fields. For example, if you know you are always going to access the order-line table by using a combination of the Order-num and Line-num fields, you might want to create an index with those two fields as its components.

Note: The current table must contain fields before you can define an index.

When you choose this option, the Data Dictionary alphabetically lists all the tables defined for your database. When you select a table, a window similar to the one shown in Figure 9–14 appears.

Figure 9–14: Index Editor window

Use the Index Editor to display the existing indexes and their information for the selected table.

The Index Editor window contains the following fields:

Besides the fields described above, the Index Editor also lists options at the bottom of its display. Table 9–18 describes these options.

Table 9–18: Index Editor options
Option
Description
Next
Displays the next index in the table.
Prev
Displays the previous index in the table.
First
Displays the first index in the table.
Last
Displays the last index in the table.
Rename
Renames the selected index. The name you enter cannot already be used to name an index in the current database.
Add
Adds a new index to the table.
Delete
Deletes the selected index. You cannot delete a primary index without making another index the primary index.
ChangePrimary
Changes the primary index for the table.
MakeInactive
Makes an active index inactive. (When an index is inactive, you cannot use it to retrieve or order records.) To reactivate an index, you must run PROUTIL with the IDXBUILD qualifier.
Browse
Browses through the entire index component list. This is especially helpful when the index is made up of multiple fields.
SwitchTable
Shows the list of tables in the database, then switches to another table to edit its indexes.
GoField
Accesses the Field Editor.
Undo
Undoes changes you made to the index attributes during this session.
Exit
Saves your changes, exits the Index Editor, and returns to the Data Dictionary Main Menu.

Choose the field you want to edit, then choose a menu option. When you choose Add from the Index Editor, the Index Editor prompts you for the name of the new index. When you enter data in the Name, Unique, Active, and Word fields, the Index Add Option dialog box, shown in Figure 9–15, appears.

Figure 9–15: Index Add Option dialog box

The Index Editor lists the available fields and their data types. When you choose a field, the Index Editor prompts you to specify whether you want the index component to be ascending or descending. After you specify the sort order, the Index Editor lets you choose more fields. You can specify up to 16 fields to define an index.

The Index Editor lists the selected fields above the divider line on the window. Select all fields, then press GO. The Index Editor prompts you to specify whether you want to use the Abbreviate option for character fields then returns you to the main Index Editor window and adds the new index to the list.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095